<?php
/**
 * 关于我们
 * @author Administrator
 *
 */
class about extends CControllerOwnerBase{
	
	private function showView($aType,$title="",$param=array())
	{
		$aboutType = array(
    		array("id"=>1,"a_type"=>"关于我们","a_type_name"=>"about"),
    		array("id"=>2,"a_type"=>"联系我们","a_type_name"=>"contact"),
    		array("id"=>3,"a_type"=>"加入我们","a_type_name"=>"join_us"),
    		array("id"=>4,"a_type"=>"法律声明","a_type_name"=>"legal_notices"),
    		array("id"=>5,"a_type"=>"服务协议","a_type_name"=>"services_agreement"),
    		array("id"=>6,"a_type"=>"充值协议","a_type_name"=>"recharge_agreement"),
    		array("id"=>7,"a_type"=>"商务合作","a_type_name"=>"cooperation"),
    		array("id"=>8,"a_type"=>"会员体系","a_type_name"=>"member_info"),
    		array("id"=>9,"a_type"=>"帮助中心","a_type_name"=>"help"),
    		array("id"=>10,"a_type"=>"新手入门","a_type_name"=>"new_member"),
    		array("id"=>11,"a_type"=>"友情链接","a_type_name"=>"links"),
    		array("id"=>12,"a_type"=>"意见反馈","a_type_name"=>"question"),
    	);
    	
    	$id=1;
    	foreach($aboutType as $item)
    	{
    		if($item["a_type_name"]==$aType)
    		{
    			$id = $item["id"];
    			break;
    		}
    	}
    	
		$model = new aboutModel();
		$aboutInfo = $model->selectByID($id,"","a_content");

        if(!$aboutInfo)
        {
        	$content = "";
        }
        else{
        	$content = stripslashes($aboutInfo['a_content']);
        }
		$param["s_title"] = $title;
		$param["a_content"] = $content;
		$this->render("about/show",$param,"common/master_about");
	}
	public function show()
	{
		$this->showView("about","关于我们");
	}
	
	public function contact()
	{
		$this->showView("contact","联系我们");
	}
	
	public function join_us()
	{
		$this->showView("join_us","加入我们");
	}
	
	public function legal_notices()
	{
		$this->showView("legal_notices","法律声明");
	}
	
	public function services_agreement()
	{
		$this->showView("services_agreement","服务协议");
	}
	
	public function recharge_agreement()
	{
		$this->showView("recharge_agreement","充值协议");
	}
	
	public function cooperation()
	{
		$this->showView("cooperation","商务合作");
	}
	
	public function member_info()
	{
		$this->showView("member_info","会员体系");
	}
	
	public function help()
	{
		$this->showView("help","帮助中心");
	}
	
	public function new_member()
	{
		$this->showView("new_member","新手入门");
	}
	
	public function links()
	{
		$this->showView("links","友情链接");
	}
	
	public function question()
	{
		$this->showView("question","意见反馈");
	}
}